package com.jsoft.jsofted.sys.service;

import com.jsoft.jsofted.framework.service.impl.CocServiceImpl;
import com.jsoft.jsofted.sys.entity.*;
import com.jsoft.jsofted.sys.mapper.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

@Configuration
public class SysCrudServices {

    @Bean("postOrgService")
    @Lazy
    public CocServiceImpl postOrgService() {
        return new CocServiceImpl<PostOrgMapper, PostOrgEntity>() {
        };
    }

    @Bean("userPostService")
    @Lazy
    public CocServiceImpl userPostService() {
        return new CocServiceImpl<UserPostMapper, UserPostEntity>() {
        };
    }

    @Bean("userRoleService")
    @Lazy
    public CocServiceImpl userRoleService() {
        return new CocServiceImpl<UserRoleMapper, UserRoleEntity>() {
        };
    }

    @Bean("uploadService")
    @Lazy
    public CocServiceImpl uploadService() {
        return new CocServiceImpl<UploadMapper, UploadEntity>() {
        };
    }

    @Bean("fileService")
    @Lazy
    public CocServiceImpl fileService() {
        return new CocServiceImpl<FileMapper, FileEntity>() {
        };
    }
}
